package cn.roadtrip.utilmodule.util.enumpck;

/**
 * 评论类别
 */
public enum Enum_CommentStats {
    Apply("Apply", "审核通过"),
    WaitAudit("WaitAudit", "待审核"),
    Pass("Pass", "审核未通过");

    private String s;
    private String title;

    Enum_CommentStats(String s, String title) {
        this.s = s;
        this.title = title;
    }

    Enum_CommentStats(String s) {
        this.s = s;
        this.title = Enum_CommentStats.parseCode(s).getTitle();
    }

    public String getTitle() {
        return this.title;
    }

    public String getCode() {
        return this.s;
    }

    public static final Enum_CommentStats parseCode(String code) {
        switch (code) {
            case "Apply":
                return Apply;
            case "WaitAudit":
                return WaitAudit;
            case "Pass":
                return Pass;
        }
        return null;
    }

    @Override
    public String toString() {
        return "(code:%s, title:%s)".formatted(this.s, this.title);
    }
}
